﻿$(function () {
    var userid = $('[id$="txtUserName"]').val();
    var pwd = $('[id$="txtPsw"]').val();
    var btn = $('[id$="btnSubmit"]');
    var lbl = $('[id$="lblMsg"]');

    btn.click = function () {
        if (userid == "" || userid == undefined) {
            lbl.html('用户名不能为空！');
            return false;
        }
        if (pwd == "" || pwd == undefined) {
            lbl.html('密码不能为空！');
            return false;
        }
    }
} ())   